<p>This rule raises an issue when <code>trimLeft()</code> or <code>trimRight()</code> methods are used on strings.</p>
<h2>Why is this an issue?</h2>
<p>The <code>trimLeft()</code> and <code>trimRight()</code> methods are deprecated aliases for <code>trimStart()</code> and <code>trimEnd()</code>.
While they still work, they exist only for backward compatibility and may be removed in future JavaScript versions.</p>
<p>The newer method names are preferred because:</p>
<ul>
  <li> They follow the official ECMAScript specification </li>
  <li> They use direction-independent terminology, which is better for internationalization </li>
  <li> They improve code consistency across projects </li>
  <li> They future-proof your code against potential deprecation </li>
</ul>
<p>Using deprecated methods can make your code appear outdated and may cause issues if these aliases are eventually removed from JavaScript
engines.</p>
<h3>What is the potential impact?</h3>
<p>Using deprecated methods may lead to maintenance issues if the aliases are removed in future JavaScript versions. While the immediate impact is
minimal, it can affect code consistency and maintainability.</p>
<h3>How to fix?</h3>
<p>Replace <code>trimLeft()</code> with <code>trimStart()</code> and <code>trimRight()</code> with <code>trimEnd()</code>. These methods have
identical functionality.</p>
<h4>Non-compliant code example</h4>
<pre data-diff-id="1" data-diff-type="noncompliant">
const text = '  hello world  ';
const leftTrimmed = text.trimLeft(); // Noncompliant
const rightTrimmed = text.trimRight(); // Noncompliant
</pre>
<h4>Compliant code example</h4>
<pre data-diff-id="1" data-diff-type="compliant">
const text = '  hello world  ';
const leftTrimmed = text.trimStart();
const rightTrimmed = text.trimEnd();
</pre>
<h3>Documentation</h3>
<ul>
  <li> <a href="https://github.com/sindresorhus/eslint-plugin-unicorn#readme">eslint-plugin-unicorn</a> - Rule <a
  href="https://github.com/sindresorhus/eslint-plugin-unicorn/blob/HEAD/docs/rules/prefer-string-trim-start-end.md">prefer-string-trim-start-end</a>
  </li>
  <li> MDN: String.prototype.trimStart() - <a
  href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimStart">Official documentation for the trimStart()
  method</a> </li>
  <li> MDN: String.prototype.trimEnd() - <a
  href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimEnd">Official documentation for the trimEnd()
  method</a> </li>
  <li> MDN: String.prototype.trimLeft() - <a
  href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimLeft">Documentation showing trimLeft() as
  deprecated alias</a> </li>
  <li> MDN: String.prototype.trimRight() - <a
  href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimRight">Documentation showing trimRight() as
  deprecated alias</a> </li>
</ul>
